package BusinessLogic;

public class Course {
  
  private String name;
  private String description;
  private float points;
  private int capacity;
  private int group;
  private String admin;
  
  public String getAdmin() {
    return admin;
  }

  public void setAdmin(String admin) {
    this.admin = admin;
  }

  @Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + ((name == null) ? 0 : name.hashCode());
	return result;
}

@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	Course other = (Course) obj;
	if (name == null) {
		if (other.name != null)
			return false;
	} else if (!name.equals(other.name))
		return false;
	return true;
}

public Course(String name, String description, float points, int capacity, int group,  String admin) {
    this.name = name;
    this.description = description;
    this.points = points;
    this.capacity = capacity;
    this.group = group;
    this.admin = admin;
  }

  public String getName() {
    return name;
  }
  public String getNameNoSpaces() {
	    return name.replace(" ", "1");
	  }

  public void setName(String name) {
    this.name = name;
  }

  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }

  public float getPoints() {
    return points;
  }

  public void setPoints(float points) {
    this.points = points;
  }

  public int getCapacity() {
    return capacity;
  }

  public void setCapacity(int capacity) {
    this.capacity = capacity;
  }

  public int getGroup() {
    return group;
  }

  public void setGroup(int group) {
    this.group = group;
  }
  
  

}
